package com.wms.web.controller.wcs;

import com.wms.common.core.controller.BaseController;
import com.wms.common.core.page.TableDataInfo;
import com.wms.system.domain.wcs.PackingList;
import com.wms.system.service.wcs.IPackingListService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


@Api(tags = "订单管理")
@RestController
@RequestMapping("/wcs/packingList")
public class PackingListController extends BaseController {
    @Autowired
    private IPackingListService packingListService;

    /**
     * 获取项目看板信息列表
     */
    @ApiOperation("获取订单管理信息列表")
    @GetMapping("/list")
    public TableDataInfo list(PackingList packingList) {
        startPage();
        List<PackingList> list = packingListService.queryList(packingList);
        return getDataTable(list);
    }


    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
    public void exportExcel(HttpServletResponse response, @RequestBody PackingList packingList) {
        packingListService.exportExcel(response,packingList);
    }

}
